home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / AMAXSELE.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  48 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _AMaxStrElement( acArray ) --> nLongestElement
  8.  
  9. PARAMETERS:
  10.  
  11. acArray : array of character strings
  12.  
  13. SHORT:
  14.  
  15. Get element number of longest character string in array.
  16.  
  17. DESCRIPTION:
  18.  
  19. _AMaxStrElement() returns the number of the element associated with
  20. longest character string in an array of strings.
  21.  
  22. If the array is empty, the return value is 0. If any element of the array
  23. is not of type char, the return value is 0.
  24.  
  25. Note: The return value does not necessarily identify any particular
  26. array element because two element strings may be the same length.
  27.  
  28. NOTE:
  29.  
  30. See also:
  31.  
  32. _AMaxStrLen() which returns the length of the longest string of an array.
  33.  
  34. EXAMPLE:
  35.  
  36. LOCAL aArray := { 'a','aaa','aaaaaaaaa','aa'}
  37. t = _AMaxStrElement( aArray )
  38.  
  39. Result: t = 3
  40.  
  41. LOCAL aArray := {}
  42. t = _AMaxStrElement( aArray )
  43.  
  44.  
  45. Result: t = 0
  46.  
  47. ******************************************************************************/
  48.